package com.cheyun.netsalev3.bean

import com.cheyun.netsalev3.utils.FunctionUtils
import com.cheyun.netsalev3.utils.LunarCalendar
import java.text.SimpleDateFormat
import java.util.*

data class CalendarParam(val time: String, val calendar: Calendar) {


    //用于日期显示的字符串
    var showTime = ""

    init {
        var dateFormat = SimpleDateFormat("yyyy年MM月dd日")
        var date = dateFormat.format(calendar.timeInMillis)
        var stime = LunarCalendar.solarToLunar(calendar.get(Calendar.YEAR),
                calendar.get(Calendar.MONTH) + 1,
                calendar.get(Calendar.DAY_OF_MONTH)
        )
        showTime = date + " / 星期" + FunctionUtils.calendarWeek(calendar.get(Calendar.DAY_OF_WEEK)) + " / " + LunarCalendar.getChinaDate(stime[2])
    }

}